﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Web.manager
{
    public partial class PhoneBookView : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SetDivePage(ref GridView1, ref GV);
            if (!IsPostBack)
            {
                QueryData();
            }
        }

        public override void QueryData()
        {
            //Hashtable user = PhoneBook.Users.Users.get(Commons.StrUtil.FormatValue(Session["userid"]));
            DataSet ds = PhoneBook.Group.PhoneBook.list(Commons.StrUtil.FormatValue(Request["groupid"]));
            //绑定数据集
            GVDataBind(ref GridView1, ref GV, ds);
        }

        //public void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        //{
        //    switch (e.CommandName)
        //    {
        //        case "del":
        //            string departmentid = e.CommandArgument.ToString();
        //            Hashtable phonebook = PhoneBook.Group.PhoneBook.get(departmentid);
        //            AddLog("删除了通讯录：{0}", phonebook["phonebookname"]);
        //            PhoneBook.Group.PhoneBook.del(departmentid);
        //            Helper.ShowMessage(u_message, controls.UCMessageType.success, "删除成功");
        //            QueryData();
        //            break;
        //        default:
        //            break;
        //    }
        //}
    }
}